package cn.xu.framework.concurrent.queue;

import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;

/**
 * @author Clark Xu<clark2021@qq.com>
 * @date 2024/9/24
 */
public class DRQMonitorServletConfig {

    @Bean
    public ServletRegistrationBean<DRQMonitorServlet> servletRegistrationBean() {
        ServletRegistrationBean<DRQMonitorServlet> registrationBean = new ServletRegistrationBean<>(new DRQMonitorServlet(), "/drq-queue-length");
        registrationBean.setLoadOnStartup(1);
        return registrationBean;
    }
}
